from userinfo import *
tuple1 = (1,2,3,4,5,6,7,8)
tuple2 = ((1,2),(3,4),(5,6),(7,8),(9,10))
#tuple3 = ()
#user1 = UserInfo('张三',18)
#user2 = UserInfo('李四',19)
#user3 = UserInfo('王二',31)
#user4 = UserInfo('麻子',55)
#user5 = UserInfo('赵六',72)
#tuple3.append(user1);
#tuple3.append(user2);
#tuple3.append(user3);
#tuple3.append(user4);
#tuple3.append(user5);

tuple4 = (UserInfo('张三',18),UserInfo('李四',19),UserInfo('王二',31),UserInfo('麻子',55),UserInfo('赵六',72))


def func1():
	for x in tuple1:
		print(x)
		#输出：
		#1
		#2
		#3
		#4
		#5
		#6
		#7
		#8
def func2():
	for x in tuple2:
	    print(x)
		#输出：
		#(1, 2)
		#(3, 4)
		#(5, 6)
		#(7, 8)
		#(9, 10)
def func4():
	for x in tuple4:
	    print('name:{0},age:{1}'.format(x.name,x.age))
		#输出：
		#name:张三,age:18
		#name:李四,age:19
		#name:王二,age:31
		#name:麻子,age:55
		#name:赵六,age:72
#def func5():
#	for x in tuple2:
#	    print(x)
func1()
func2()
func4()